home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 1
/
Cream of the Crop 1.iso
/
UTILITY
/
TASEXAM6.ARJ
/
VOLBRK2.TAS
< prev
next >
Wrap
Text File
|
1992-03-11
|
4KB
|
116 lines
{
SCRIPT : VOLBRK2.TAS
Output File => VOLBRK.LST
Author : Peter Ross
Date : 12/12/91
This script will SCREEN for volume breakouts of stocks that closed
at the same or higher than yesterday, and are 15% or less from their 52
week high.
In addition, it will ALERT you to those stocks that have had a 30
day price breakout, and when a new high has been reached.
Modifications: Frank Wolynski
Date : 02/09/92
Modifications were made to Peter's TAS file to allow single line
printouts of the security. Also rearranged prior close & current close
and included percentage change for the day. Since only securities
exhibiting the necessary volume breakout percentages were allowed
through the test, it was not necessary to identify the securities
as having done so.
Modifications: Jerry Green
Date : 03/11/92
Modified to show OBV yearly high. Plus some comment changes.
}
#MAX_QUOTES 262
#OUTPUT_FILE 'VOLBRK.LST+'
IF FIRST_TICKER THEN
begin
{**********************************************************}
{ Count the Total Tickers in your Directories }
{**********************************************************}
TOTAL := 0;
WRITELN(' Prev Curr',
' Price Curr OFF');
WRITELN('TICKER NAME CLOSE CLOSE',
' Change Vol % HIGH');
WRITELN('------------------------ ------- -------',
' ------ ----- ----');
end;
{ #SCAN_DATE '920206' }
{**********************************************************}
{ NOTE: STOCKS IN DATABASE WITH LESS THAN 262 QUOTES WILL }
{ NOT BE FLAGGED. }
{**********************************************************}
if quote_count < 262 then
GOSUB FINI;
{**********************************************************}
{ Parameter settings follow. }
{ These parameters can be changed to suit you. }
{**********************************************************}
{ Price breakout lookback period, Volume breakout lookback }
{ period, and Percentage for VOLUME BREAKOUT }
{**********************************************************}
PRICE_BREAKOUT_PERIOD = 30;
VOL_BREAKOUT_PERIOD = 30;
VOL_PERCENT = 150;
{**********************************************************}
{ Declare various arrays to hold the results of indicators }
{**********************************************************}
HHV_A : ARRAY; { Place to save HHV }
VOL_A : ARRAY; { Place to save Volume Moving average }
OBV_A : ARRAY; { Place to save On Balance Volume }
high_obv : array;
PRICE_BREAKOUT = 0;
VOL_BREAKOUT = 0;
OBV_BREAKOUT = 0;
{**********************************************************}
{ The next few lines find the % from the 52 week high. }
{**********************************************************}
HHV_A = HHV(C,PRICE_BREAKOUT_PERIOD);
VOL_A = MOV(V,VOL_BREAKOUT_PERIOD,'S');
OBV_A = OBV();
high_value = HHV(h,52*5);
off_high_value = ((high_value - c[0]) / high_value) * 100;
day_change = roc(c,1,'%');
high_obv = HHV(OBV_A,52*5);
off_obv_high = ((high_obv - OBV_A) / high_obv) * 100;
IF CLOSE OF TODAY IS GREATER THAN HHV_A OF YESTERDAY THEN
begin
PRICE_BREAKOUT = 1;
end;
IF VOLUME OF TODAY IS GREATER THAN
VOL_PERCENT/100 * VOL_A OF YESTERDAY THEN
begin
VOL_BREAKOUT = (VOLUME OF TODAY/VOL_A OF YESTERDAY) * 100;
end;
IF OBV_A OF TODAY IS GREATER THAN high_obv OF YESTERDAY THEN
begin
OBV_BREAKOUT = 1;
end;
TOTAL := TOTAL + 1;
IF VOL_BREAKOUT AND OFF_HIGH_VALUE < 16
AND CLOSE OF TODAY >= CLOSE OF YESTERDAY
THEN
BEGIN
WRITE(ticker,fullname, close of yesterday,
close,INT(day_change),'%',
INT(((volume/VOL_A[-1]))*100),'% '
,INT(off_high_value),'%',' ');
IF PRICE_BREAKOUT THEN
WRITE(INT(PRICE_BREAKOUT_PERIOD),'DAY HI');
IF OBV_BREAKOUT THEN
WRITE(' OB ');
IF high_value <= h then
write(' $ ');
ELSE
writeln();
GOSUB FINI;
END;
:FINI
IF LAST_TICKER THEN
BEGIN
WRITELN('Total Companies Processed',' ',INT(TOTAL));
WRITELN(' OB INDICATES NEW YEARLY ON BALANCE VOLUME HIGH');
WRITELN(' $ INDICATES NEW 52 WEEK HIGH PRICE');
END;